import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * Rappresenta tutti i dettagli di interesse relativi ad un film
 *
 */
@XmlRootElement
public class DetailedMovie {
	private String id;
	private String title;
	private String director;
	private String date;
	private List<String> actors;
	private List<MovieType> movieTypes;
	private String thumbnailURL; // 32x32
	private String playbillURL;
	private String trailerURL;

	public DetailedMovie() {
		title = "";
		id = "";
		date = "";
		thumbnailURL = "";
		director = "";
		actors = new ArrayList<String>();
		movieTypes = new ArrayList<MovieType>();
		playbillURL = "";
		trailerURL = "";
	}

	public DetailedMovie(String id, String title, String director,
			String date, List<String> actors, List<MovieType> movieTypes,
			String thumbnailURL, String playbillURL, String trailerURL) {
		super();
		this.id = id;
		this.title = title;
		this.director = director;
		this.date = date;
		this.actors = actors;
		this.movieTypes = movieTypes;
		this.thumbnailURL = thumbnailURL;
		this.playbillURL = playbillURL;
		this.trailerURL = trailerURL;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDirector() {
		return director;
	}

	public void setDirector(String director) {
		this.director = director;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public List<String> getActors() {
		return actors;
	}

	public void setActors(List<String> actors) {
		this.actors = actors;
	}

	public List<MovieType> getMovieTypes() {
		return movieTypes;
	}

	public void setMovieTypes(List<MovieType> movieTypes) {
		this.movieTypes = movieTypes;
	}

	public String getThumbnailURL() {
		return thumbnailURL;
	}

	public void setThumbnailURL(String thumbnailURL) {
		this.thumbnailURL = thumbnailURL;
	}

	public String getPlaybillURL() {
		return playbillURL;
	}

	public void setPlaybillURL(String playbillURL) {
		this.playbillURL = playbillURL;
	}

	public String getTrailerURL() {
		return trailerURL;
	}

	public void setTrailerURL(String trailerURL) {
		this.trailerURL = trailerURL;
	}
	
	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("MovieID: ");
		sb.append(getId());
		sb.append("\n");
		sb.append("Title: ");
		sb.append(getTitle());
		sb.append("\n");
		sb.append("Director: ");
		sb.append(getDirector());
		sb.append("\n");
		sb.append("Actors: ");
		sb.append(getActors().toString());
		sb.append("\n");
		sb.append("Release date: ");
		sb.append(getDate());
		sb.append("\n");
		sb.append("Types: ");
		sb.append(getMovieTypes().toString());
		sb.append("\n");
		sb.append("ThumbnailURL: ");
		sb.append(getThumbnailURL());
		sb.append("\n");
		sb.append("PlaybillURL: ");
		sb.append(getPlaybillURL());
		sb.append("\n");
		sb.append("TrailerURL: ");
		sb.append(getTrailerURL());
		sb.append("\n");
		
		return sb.toString();
	}

}
